<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">

	<ul class="nav nav-tabs">
		<li><a class="nav-link" href="{:url('project/add')}">新建项目</a></li>
        <li class="active"><a class="nav-link active" href="{:url('project/index')}">项目列表</a></li>
        
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('project/index')}">
        关键词:
        <input type="text" class="form-control" name="keyword" value="{$keyword}" style="width: 280px;" placeholder="项目名称/公司/负责人姓名/负责人电话"> &nbsp;&nbsp;
  
       
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('customer/index')}">清空</a>
    </form>
	
	<div class="row">
		<div class="col-md-12">
			<div class="card-body">
				<div class="table-actions">
		           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label>总计<span style="font-size: 24px;">{$sum_result_count}</span>条数据</label>
		        </div>
			    <form method="post" class="js-ajax-form margin-top-20" action="{:url('case/listOrder')}">
			        
			        
			        <table class="table table-hover table-bordered">
			            <thead>
			            <tr>
			                <th width="50" style="text-align: center;">ID</th>
			                <th style="text-align: center;">项目名称</th>
                            <th style="text-align: center;">项目简称</th>
			                <th style="text-align: center;">所属公司</th>
			                <th style="text-align: center;">负责人</th>
			                <th style="text-align: center;">负责人电话</th>
			                <th style="text-align: center;">项目测试地址</th>
			                <th style="text-align: center;">项目进度流程节点图</th>
			                <th style="text-align: center;">项目流程管理</th>
			                <th style="text-align: center;">开始时间</th>
			                <th style="text-align: center;">申请时间</th>                
			                <th width="160" style="text-align: center;">{:lang('ACTIONS')}</th>
			            </tr>
			            </thead>
			            <tbody>
				           	 <foreach name="result" item="vo" key='k'>
				                <tr style="text-align: center;">			 
				                	<td><?php echo ($now_page-1)*10+$k+1;?></td>    
				                	<td><a href="javascript:;" onclick="project({$vo.id});">{$vo.project_name}</a></td>		
                                    <td><a href="javascript:;" onclick="project({$vo.id});">{$vo.project_short_name}</a></td> 
				                	<td><a href="javascript:;" onclick="company({$vo.company_id});">{$vo.company_name}</a></td>
				                	<td><a href="javascript:;" onclick="customer({$vo.customer_id});">{$vo.customer_name}</a></td>            	           
				                    <td>{$vo.customer_mobile}</td>
				                    <td><a href="javascript:;" onclick="test_blocked({$vo.id});">编辑</a></td>
				                    <td><a href="javascript:;" onclick="node_graph({$vo.id});">编辑</a></td>
				                    <td><a href="javascript:;" onclick="process({$vo.id});">点击管理</a></td>
				                    <td><?php if(!$vo['start_time']){ echo '未开始';}else{ echo date('Y-m-d H:i:s',$vo['start_time']); }?></td>		
				                    <td><?php echo date('Y-m-d H:i:s',$vo['add_time']);?></td>     		               
				                    <td>
				                        <a href="{:url('project/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
				                        <!-- <a href="{:url('case/delete',array('id'=>$vo['id']))}"
				                           class="js-ajax-delete">{:lang('DELETE')}</a> -->
				                        
				                    </td>
				                </tr>
				            </foreach>
			            </tbody>
			        </table>
			        <ul class="pagination">{$page|default=''}</ul>
			    </form>
			

			</div>
		</div>
	</div>
</div>
</body>
<block name="script">

<script src="__STATIC__/js/admin.js"></script>
<script>
	 function company(id) {
        openIframeLayer("{:url('company/detail')}?id="+id+"&status=2", '公司详情', {
            area: ['80%;', '80%;'],
            btn: ['关闭'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }

    function customer(id) {
        openIframeLayer("{:url('customer/detail')}?id="+id+"&status=2", '客户详情', {
            area: ['80%;', '80%;'],
            btn: ['关闭'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }

    function project(id) {
        openIframeLayer("{:url('project/detail')}?id="+id+"&status=2", '项目详情', {
            area: ['80%;', '80%;'],
            btn: ['关闭'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }

    function process(id)
    {
    	openIframeLayer("{:url('project/process')}?id="+id, '项目流程管理', {
            area: ['100%;', '100%;'],
            btn: ['关闭'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }

    function test_blocked(id)
    {
    	openIframeLayer("{:url('project/testBlocked')}?id="+id, '项目测试地址编辑', {
            area: ['40%;', '60%;'],
            btn: ['关闭'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }


    function node_graph(id)
    {
    	openIframeLayer("{:url('project/nodeGraph')}?id="+id, '项目节点图编辑', {
            area: ['80%;', '80%;'],
            btn: ['确定'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }
</script>
</block>